home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1993 April: Penguin on DISC / ADC Developer CD (1993-04) (''Penguin On DISC'')_iso / Dev.CD Apr 93.iso / Utilities / MPW Interfaces 7.1 Beta / CIncludes / Lists.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-08-28  |  4.3 KB  |  152 lines  |  [TEXT/MPS ]

  1.  
  2. /************************************************************
  3.  
  4. Created: Friday, September 13, 1991 at 12:54 PM
  5.  Lists.h
  6.  C Interface to the Macintosh Libraries
  7.  
  8.  
  9.   Copyright Apple Computer, Inc. 1985-1991
  10.   All rights reserved
  11.  
  12. ************************************************************/
  13.  
  14.  
  15. #ifndef __LISTS__
  16. #define __LISTS__
  17.  
  18. #ifndef __TYPES__
  19. #include <Types.h>
  20. #endif
  21.  
  22. #ifndef __CONTROLS__
  23. #include <Controls.h>
  24. #endif
  25.  
  26. #ifndef __MEMORY__
  27. #include <Memory.h>
  28. #endif
  29.  
  30.  
  31. enum {
  32.  
  33.  lDoVAutoscroll = 2,
  34.  lDoHAutoscroll = 1,
  35.  lOnlyOne = -128,
  36.  lExtendDrag = 64,
  37.  lNoDisjoint = 32,
  38.  lNoExtend = 16,
  39.  lNoRect = 8,
  40.  lUseSense = 4,
  41.  lNoNilHilite = 2,
  42.  lInitMsg = 0,
  43.  lDrawMsg = 1,
  44.  lHiliteMsg = 2,
  45.  lCloseMsg = 3
  46. };
  47.  
  48. typedef Point Cell;
  49.  
  50. typedef char DataArray[32001],*DataPtr,**DataHandle;
  51. typedef pascal short (*SearchProcPtr)(Ptr aPtr, Ptr bPtr, short aLen, short bLen);
  52.  
  53. struct ListRec {
  54.  Rect rView;
  55.  GrafPtr port;
  56.  Point indent;
  57.  Point cellSize;
  58.  Rect visible;
  59.  ControlHandle vScroll;
  60.  ControlHandle hScroll;
  61.  char selFlags;
  62.  Boolean lActive;
  63.  char lReserved;
  64.  char listFlags;
  65.  long clikTime;
  66.  Point clikLoc;
  67.  Point mouseLoc;
  68.  ProcPtr lClikLoop;
  69.  Cell lastClick;
  70.  long refCon;
  71.  Handle listDefProc;
  72.  Handle userHandle;
  73.  Rect dataBounds;
  74.  DataHandle cells;
  75.  short maxIndex;
  76.  short cellArray[1];
  77. };
  78.  
  79. typedef struct ListRec ListRec;
  80. typedef ListRec *ListPtr, **ListHandle;
  81.  
  82.  
  83. #ifdef __cplusplus
  84. extern "C" {
  85. #endif
  86. ListHandle lnew(Rect *rView,Rect *dataBounds,Point *cSize,short theProc,
  87.  WindowPtr theWindow,Boolean drawIt,Boolean hasGrow,Boolean scrollHoriz,
  88.  Boolean scrollVert); 
  89. pascal ListHandle LNew(const Rect *rView,const Rect *dataBounds,Point cSize,
  90.  short theProc,WindowPtr theWindow,Boolean drawIt,Boolean hasGrow,Boolean scrollHoriz,
  91.  Boolean scrollVert)
  92.  = {0x3F3C,0x0044,0xA9E7}; 
  93. pascal void LDispose(ListHandle lHandle)
  94.  = {0x3F3C,0x0028,0xA9E7}; 
  95. pascal short LAddColumn(short count,short colNum,ListHandle lHandle)
  96.  = {0x3F3C,0x0004,0xA9E7}; 
  97. pascal short LAddRow(short count,short rowNum,ListHandle lHandle)
  98.  = {0x3F3C,0x0008,0xA9E7}; 
  99. pascal void LDelColumn(short count,short colNum,ListHandle lHandle)
  100.  = {0x3F3C,0x0020,0xA9E7}; 
  101. pascal void LDelRow(short count,short rowNum,ListHandle lHandle)
  102.  = {0x3F3C,0x0024,0xA9E7}; 
  103. pascal Boolean LGetSelect(Boolean next,Cell *theCell,ListHandle lHandle)
  104.  = {0x3F3C,0x003C,0xA9E7}; 
  105. pascal Cell LLastClick(ListHandle lHandle)
  106.  = {0x3F3C,0x0040,0xA9E7}; 
  107. pascal Boolean LNextCell(Boolean hNext,Boolean vNext,Cell *theCell,ListHandle lHandle)
  108.  = {0x3F3C,0x0048,0xA9E7}; 
  109. pascal Boolean LSearch(const void *dataPtr,short dataLen,SearchProcPtr searchProc,
  110.  Cell *theCell,ListHandle lHandle)
  111.  = {0x3F3C,0x0054,0xA9E7}; 
  112. pascal void LSize(short listWidth,short listHeight,ListHandle lHandle)
  113.  = {0x3F3C,0x0060,0xA9E7}; 
  114. pascal void LDoDraw(Boolean drawIt,ListHandle lHandle)
  115.  = {0x3F3C,0x002C,0xA9E7}; 
  116. pascal void LScroll(short dCols,short dRows,ListHandle lHandle)
  117.  = {0x3F3C,0x0050,0xA9E7}; 
  118. pascal void LAutoScroll(ListHandle lHandle)
  119.  = {0x3F3C,0x0010,0xA9E7}; 
  120. pascal void LUpdate(RgnHandle theRgn,ListHandle lHandle)
  121.  = {0x3F3C,0x0064,0xA9E7}; 
  122. pascal void LActivate(Boolean act,ListHandle lHandle)
  123.  = {0x4267,0xA9E7}; 
  124. pascal void LCellSize(Point cSize,ListHandle lHandle)
  125.  = {0x3F3C,0x0014,0xA9E7}; 
  126. pascal Boolean LClick(Point pt,short modifiers,ListHandle lHandle)
  127.  = {0x3F3C,0x0018,0xA9E7}; 
  128. pascal void LAddToCell(const void *dataPtr,short dataLen,Cell theCell,ListHandle lHandle)
  129.  = {0x3F3C,0x000C,0xA9E7}; 
  130. pascal void LClrCell(Cell theCell,ListHandle lHandle)
  131.  = {0x3F3C,0x001C,0xA9E7}; 
  132. pascal void LGetCell(void *dataPtr,short *dataLen,Cell theCell,ListHandle lHandle)
  133.  = {0x3F3C,0x0038,0xA9E7}; 
  134. pascal void LFind(short *offset,short *len,Cell theCell,ListHandle lHandle)
  135.  = {0x3F3C,0x0034,0xA9E7}; 
  136. pascal void LRect(Rect *cellRect,Cell theCell,ListHandle lHandle)
  137.  = {0x3F3C,0x004C,0xA9E7}; 
  138. pascal void LSetCell(const void *dataPtr,short dataLen,Cell theCell,ListHandle lHandle)
  139.  = {0x3F3C,0x0058,0xA9E7}; 
  140. pascal void LSetSelect(Boolean setIt,Cell theCell,ListHandle lHandle)
  141.  = {0x3F3C,0x005C,0xA9E7}; 
  142. pascal void LDraw(Cell theCell,ListHandle lHandle)
  143.  = {0x3F3C,0x0030,0xA9E7}; 
  144. void ldraw(Cell *theCell,ListHandle lHandle); 
  145. Boolean lclick(Point *pt,short modifiers,ListHandle lHandle); 
  146. void lcellsize(Point *cSize,ListHandle lHandle); 
  147. #ifdef __cplusplus
  148. }
  149. #endif
  150.  
  151. #endif
  152.